package kr.hkit.powerjava.chapter14;

import java.awt.BorderLayout;
import java.awt.HeadlessException;

import javax.swing.JButton;
import javax.swing.JFrame;

class MyFrame extends JFrame {

	public MyFrame() throws HeadlessException {
		init();
	}

	private void init() {
		setSize(450, 300);
		setLayout(new BorderLayout(30, 30));
/*		BorderLayout layout = (BorderLayout) getLayout();
		layout.setVgap(30);
		layout.setHgap(30);*/
		
		
		add(new JButton("Center"), BorderLayout.CENTER);
		add(new JButton("Page Start"), BorderLayout.NORTH);
		add(new JButton("Page End"), BorderLayout.SOUTH);
		add(new JButton("Line Start"), BorderLayout.LINE_START);	
		add(new JButton("Line End"), BorderLayout.LINE_END);
		
		
		setVisible(true);
	}
}

public class BordeLayout {
	public static void main(String[] args) {
		new MyFrame();
	}
}
